<?php

/**
 * controller: activeren gebruikersaccount
 * 
 * 
 * 
 * @package     Aanmelden
 * @subpackage  Controller
 * @author      Ronny Sweetlove
 */

namespace Aanmelden\Controller;

class Activeer extends \Controller{
    
    /**
     * 
     */
    public function index() {
        $this->_view = new \Aanmelden\Views\View();
        $this->_model = new \Aanmelden\Model\Activeer();
        $rslt = $this->_model->verifieer();
        $this->_view->setData('rslt',$rslt);
        $view = $rslt['gevonden']?'index':'fout';
        $this->_view->genereer('Aanmelden','Activeer',$view);
        \Weergave::GENEREER();
    }
    
    public function activeer() {
        $this->_model = new \Aanmelden\Model\Activeer();
        $json = $this->_model->activeer();
        echo json_encode($json);
    }
}
